import 'package:flutter/cupertino.dart';
import 'package:hitutor/Util/Global.dart';
import 'package:hitutor/Util/MyColor.dart';
import 'package:hitutor/Util/PageUtil.dart';
import 'package:hitutor/Widget/MyButton.dart';
import 'package:hitutor/Widget/MyInput.dart';
import 'package:hitutor/Widget/MyPage.dart';

class ChangePassword2 extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return _ChangePassword2();
  }
}

class _ChangePassword2 extends State<ChangePassword2> {
  TextEditingController pswController = TextEditingController();
  TextEditingController pswController2 = TextEditingController();

  confirmClick() {
    PageUtil().back(context);
  }

  @override
  Widget build(BuildContext context) {
    return MyPage(
        "驗證密碼",
        Container(
            padding: EdgeInsets.all(20),
            child: Column(children: [
              Container(
                decoration: Global.getBg(MyColor.F3, 4),
                height: 32,
                margin: EdgeInsets.fromLTRB(0, 8, 0, 8),
                padding: EdgeInsets.only(left: 8),
                child: NormalInput(hintText: "新密碼", fontSize: 12, controller: pswController),
              ),
              Container(
                decoration: Global.getBg(MyColor.F3, 4),
                height: 32,
                margin: EdgeInsets.fromLTRB(0, 8, 0, 48),
                padding: EdgeInsets.only(left: 8),
                child: NormalInput(hintText: "密碼確認", fontSize: 12, controller: pswController2),
              ),
              Button("確認", height: 32, bgColor: Color(0xff43bacc), width: double.infinity, radius: 4, fontSize: 13, onTap: confirmClick),
            ])));
  }
}
